import numpy as np
import matplotlib.pyplot as plt
import os

list_temp = []
for root, dirs, files in os.walk("."):
    for filename in files:
        list_temp.append(filename)

kw = ['Angle']

filelist = []
for items in list_temp:
    for ele in kw:
        if ele in items:
            filelist.append(items)

ang = []
for i in range(len(filelist)):
    a = np.loadtxt(filelist[i]) 
    str1 = "cp "+ filelist[i] + " type1"
    str2 = "cp "+ filelist[i] + " type2"
    if np.max(a) < 10:
        os.system(str1)
    else:
        os.system(str2)

